package pp.gateway.adapter.video.download.vo;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import pp.gateway.application.video.download.param.ChunkParam;

@Data
public class ChunkVO {
    Long userId;
    MultipartFile file;
    int chunkNumber;
    int totalChunks;
    String identifier;
    String fileName;

    public ChunkParam toParam() {
        ChunkParam out = new ChunkParam();
        out.setChunkNumber(this.getChunkNumber());
        out.setFile(this.getFile());
        out.setTotalChunks(this.totalChunks);
        out.setIdentifier(this.getIdentifier());
        out.setUserId(this.userId);
        out.setFileName(this.fileName);
        return out;
    }
}
